#include <sobjc-commons/defines.h>
#include <sobjc-commons/utils.h>
#include "ivar.h"

Ivar
objc_make_ivar(const char *name, const char *type, ptrdiff_t offset)
{
  Ivar ivar;

  ivar = ALLOC(struct objc_ivar);
  ivar->name = objc_strdup(name);
  ivar->type = objc_strdup(type);
  ivar->offset = offset;

  return ivar;
}

const char *
objc_ivar_get_name(Ivar ivar)
{
  return ivar->name;
}

const char *
objc_ivar_get_type(Ivar ivar)
{
  return ivar->type;
}

int
objc_ivar_get_offset(Ivar ivar)
{
  return ivar->offset;
}

size_t
objc_ivar_get_size(Ivar ivar)
{
  /* FIXME */
  return 0;
}

